package resp

import "likeadmin/core"

// SettingDictTypeResp 字典类型返回信息
type SettingDictTypeResp struct {
	ID         uint        `json:"id" structs:"id"`                 // 主键
	DictName   string      `json:"dictName" structs:"dictName"`     // 字典名称
	DictType   string      `json:"dictType" structs:"dictType"`     // 字典类型
	DictRemark string      `json:"dictRemark" structs:"dictRemark"` // 字典备注
	DictStatus uint8       `json:"dictStatus" structs:"dictStatus"` // 字典状态
	CreateTime core.TsTime `json:"createTime" structs:"createTime"` // 创建时间
	UpdateTime core.TsTime `json:"updateTime" structs:"updateTime"` // 更新时间
}

// SettingDictDataResp 字典数据返回信息
type SettingDictDataResp struct {
	ID         uint        `json:"id" structs:"id"`                 // 主键
	TypeId     uint        `json:"typeId" structs:"typeId"`         // 类型
	Name       string      `json:"name" structs:"name"`             // 键
	Value      string      `json:"value" structs:"value"`           // 值
	Remark     string      `json:"remark" structs:"remark"`         // 备注
	Sort       uint16      `json:"sort" structs:"sort"`             // 排序
	Status     uint8       `json:"status" structs:"status"`         // 状态: [0=停用, 1=禁用]
	CreateTime core.TsTime `json:"createTime" structs:"createTime"` // 创建时间
	UpdateTime core.TsTime `json:"updateTime" structs:"updateTime"` // 更新时间
}

// NoticeSettingResp 通知设置返回信息
type NoticeSettingResp struct {
	ID           int32       `json:"id" structs:"id"`                       //
	SceneID      int32       `json:"scene_id" structs:"scene_id"`           // 场景id
	SceneName    string      `json:"scene_name" structs:"scene_name"`       // 场景名称
	SceneDesc    string      `json:"scene_desc" structs:"scene_desc"`       // 场景描述
	Recipient    int32       `json:"recipient" structs:"recipient"`         // 接收者 1-用户 2-平台
	Type         int32       `json:"type" structs:"type"`                   // 通知类型: 1-业务通知 2-验证码
	SystemNotice string      `json:"system_notice" structs:"system_notice"` // 系统通知设置
	SmsNotice    string      `json:"sms_notice" structs:"sms_notice"`       // 短信通知设置
	OaNotice     string      `json:"oa_notice" structs:"oa_notice"`         // 公众号通知设置
	MnpNotice    string      `json:"mnp_notice" structs:"mnp_notice"`       // 小程序通知设置
	Support      string      `json:"support" structs:"support"`             // 支持的发送类型 1-系统通知 2-短信通知 3-微信模板消息 4-小程序提醒
	UpdateTime   core.TsTime `json:"update_time" structs:"update_time"`     // 更新时间
}

type SmsSettingResp struct {
	Name      string `json:"name" structs:"name"`
	Alias     string `json:"alias" structs:"alias"`
	Sign      string `json:"sign" structs:"sign"`
	AppKey    string `json:"appKey" structs:"appKey"`
	AppId     string `json:"appId" structs:"appId"`
	SecretKey string `json:"secretKey" structs:"secretKey"`
	SecretId  string `json:"secretId" structs:"secretId"`
	Status    int32  `json:"status" structs:"status"`
}

type StorageSettingResp struct {
	Name      string `json:"name" structs:"name"`
	Engine    string `json:"engine" structs:"engine"`
	Describe  string `json:"describe" structs:"describe"`
	Bucket    string `json:"bucket,omitempty" structs:"bucket"`
	Endpoint  string `json:"endpoint,omitempty" structs:"endpoint"`
	AccessKey string `json:"access_key,omitempty" structs:"access_key"`
	Domain    string `json:"domain,omitempty" structs:"domain"`
	SecretKey string `json:"secret_key,omitempty" structs:"secret_key"`
	Region    string `json:"region,omitempty" structs:"region"`
	Status    int32  `json:"status,omitempty" structs:"status"`
}

type RechargeSettingResp struct {
	Status    int `json:"status" structs:"status"`
	MinAmount int `json:"min_amount" structs:"min_amount"`
}

// UserSetResp 设置用户默认头像
type UserSetResp struct {
	DefaultAvatar string `json:"default_avatar" structs:"defaultAvatar"` // 默认头像
}

type SettingLoginResp struct {
	LoginWay        []int32 `json:"loginWay" structs:"loginWay"`
	ForceBindMobile int32   `json:"forceBindMobile" structs:"forceBindMobile"`
	OpenAgreement   int32   `json:"openAgreement" structs:"openAgreement"`
	OpenOtherAuth   int32   `json:"openOtherAuth" structs:"openOtherAuth"`
	AutoLoginAuth   []int32 `json:"autoLoginAuth" structs:"autoLoginAuth"`
}

type PaySettingResp struct {
	Name        string `json:"name" structs:"name"`
	DisplayName string `json:"display_name" structs:"display_name"`
	Icon        string `json:"icon" structs:"icon"`
	Remark      string `json:"remark" structs:"remark"`
	Domain      string `json:"domain" structs:"domain"`
	Sort        int32  `json:"sort" structs:"sort"`
	Config      struct {
		ApiClientCert    string `json:"api_client_cert,omitempty" structs:"api_client_cert"`     //微信支付配置
		ApiClientKey     string `json:"api_client_key,omitempty" structs:"api_client_key"`       //微信支付配置
		InterfaceVersion string `json:"interface_version,omitempty" structs:"interface_version"` //微信支付配置
		MchId            string `json:"mch_id,omitempty" structs:"mch_id"`                       //微信支付配置
		MerchantType     string `json:"merchant_type,omitempty" structs:"merchant_type"`         //微信支付配置 支付宝配置
		PaySignKey       string `json:"pay_sign_key,omitempty" structs:"pay_sign_key"`           //微信支付配置
		AliPublicKey     string `json:"ali_public_key,omitempty" structs:"ali_public_key"`       //支付宝配置
		AppId            string `json:"app_id,omitempty" structs:"app_id"`                       //支付宝配置
		Mode             string `json:"mode,omitempty" structs:"mode"`                           //支付宝配置
		PrivateKey       string `json:"private_key,omitempty" structs:"private_key"`             //支付宝配置
	} `json:"config,omitempty" structs:"config"`
}

type PaySceneResp struct {
	Scene       string `json:"scene" structs:"scene"`
	IsDefault   int32  `json:"is_default" structs:"is_default"` // 1 默认
	Status      int32  `json:"status" structs:"status"`         // 1 开启 0 关闭
	PaymentName string `json:"payment_name" structs:"payment_name"`
	DisplayName string `json:"display_name" structs:"display_name"`
	Icon        string `json:"icon" structs:"icon"`
}
